package BTree;

public class test {
    public static void main(String[] args) {
        BTree bTree=new BTree();
BTree.TreeNode root=bTree.create();

//前中后序遍历
bTree.preOrder(root);
        System.out.println();
        bTree.inOrder(root);
        System.out.println();
        bTree.postOrder(root);
        System.out.println();
        //获取二叉树的节点个数
        bTree.getBtreesize(root);
        System.out.println(bTree.size);
//方法2，获取节点个数
        System.out.println(bTree.getSize(root));

        //获取第k层的节点个数
        System.out.println(bTree.getKsize(root, 1));
        System.out.println(bTree.getKsize(root, 2));
        System.out.println(bTree.getKsize(root, 3));

        //获取二叉树的高度
        System.out.println(bTree.getHigh(root));
    }
}
